﻿using EfDomain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;


namespace EfInfra.EntityConfigurations
{
    public class OneToOneConfigurations : IEntityTypeConfiguration<Blog>
    {
        public void Configure(EntityTypeBuilder<Blog> builder)
        {
            builder
               .HasOne(e => e.Header)
               .WithOne(e => e.Blog)
               .HasForeignKey<BlogHeader>(e => e.BlogId);
        }
    }
}